<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>.createSourceWithParams(params) -&gt; Promise · tipsi-stripe</title>
    <meta name="viewport" content="width=device-width" />
    <meta name="generator" content="Docusaurus" />
    <meta
      name="description"
      content='&lt;p&gt;Creates source object based on params. Sources are used to create payments for a variety of &lt;a href="https://stripe.com/docs/sources"&gt;payment methods&lt;/a&gt;&lt;/p&gt;
'
    />
    <meta name="docsearch:language" content="en" />
    <meta
      property="og:title"
      content=".createSourceWithParams(params) -&gt; Promise · tipsi-stripe"
    />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="https://tipsi.github.io/tipsi-stripe/index.html" />
    <meta
      property="og:description"
      content='&lt;p&gt;Creates source object based on params. Sources are used to create payments for a variety of &lt;a href="https://stripe.com/docs/sources"&gt;payment methods&lt;/a&gt;&lt;/p&gt;
'
    />
    <meta name="twitter:card" content="summary" />
    <link rel="shortcut icon" href="/tipsi-stripe/img/favicon.png" />
    <link
      rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"
    />
    <link
      rel="alternate"
      type="application/atom+xml"
      href="https://tipsi.github.io/tipsi-stripe/blog/atom.xml"
      title="tipsi-stripe Blog ATOM Feed"
    />
    <link
      rel="alternate"
      type="application/rss+xml"
      href="https://tipsi.github.io/tipsi-stripe/blog/feed.xml"
      title="tipsi-stripe Blog RSS Feed"
    />
    <script type="text/javascript" src="https://buttons.github.io/buttons.js"></script>
    <script src="/tipsi-stripe/js/scrollSpy.js"></script>
    <link rel="stylesheet" href="/tipsi-stripe/css/main.css" />
    <script src="/tipsi-stripe/js/codetabs.js"></script>
  </head>
  <body class="sideNavVisible">
    <div class="fixedHeaderContainer">
      <div class="headerWrapper wrapper">
        <header>
          <a href="/tipsi-stripe/"
            ><img class="logo" src="/tipsi-stripe/img/favicon.png" alt="tipsi-stripe" />
            <h2 class="headerTitleWithLogo">tipsi-stripe</h2></a
          >
          <div class="navigationWrapper navigationSlider">
            <nav class="slidingNav">
              <ul class="nav-site nav-site-internal">
                <li class="siteNavGroupActive">
                  <a href="/tipsi-stripe/docs/index.html" target="_self">Docs</a>
                </li>
                <li class=""><a href="/tipsi-stripe/blog/" target="_self">Blog</a></li>
              </ul>
            </nav>
          </div>
        </header>
      </div>
    </div>
    <div class="navPusher">
      <div class="docMainWrapper wrapper">
        <div class="container docsNavContainer" id="docsNav">
          <nav class="toc">
            <div class="toggleNav">
              <section class="navWrapper wrapper">
                <div class="navBreadcrumb wrapper">
                  <div class="navToggle" id="navToggler">
                    <div class="hamburger-menu">
                      <div class="line1"></div>
                      <div class="line2"></div>
                      <div class="line3"></div>
                    </div>
                  </div>
                  <h2><i>›</i><span>Create Source Object With Params</span></h2>
                </div>
                <div class="navGroups">
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Overview</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/index.html">Start here</a>
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/compatibility.html"
                          >Compatibility</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/installation.html"
                          >Installation</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/linking.html">Linking</a>
                      </li>
                      <li class="navListItem">
                        <a
                          class="navItem"
                          href="/tipsi-stripe/docs/running-apple-pay-on-a-real-device.html"
                          >Running  Pay on a real Device</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/google-pay.html">Google Pay</a>
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/usage.html">Usage</a>
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/example.html">Example</a>
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/paymentIntents.html"
                          >Payment Intent API</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/createCardOrSubscription.html"
                          >Save Card/Subscription</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/migrationIssues.html"
                          >Migration</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/changelog.html">Changelog</a>
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Objects</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/token.html">Token</a>
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/source.html">Source</a>
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/paymentMethod.html"
                          >Payment Method</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Native Pay -  &amp; G</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/canMakeNativePayPayments.html"
                          >.canMakeNativePayPayments()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/deviceSupportsNativePay.html"
                          >.deviceSupportsNativePay()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a
                          class="navItem"
                          href="/tipsi-stripe/docs/potentiallyAvailableNativePayNetworks.html"
                          >.potentiallyAvailableNativePayNetworks()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/completeNativePayRequest.html"
                          >.completeNativePayRequest()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/cancelNativePayRequest.html"
                          >.cancelNativePayRequest()</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Card Form</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/paymentrequestwithcardform.html"
                          >.paymentRequestWithCardForm()</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Card Params Object</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/createtokenwithcard.html"
                          >.createTokenWithCard()</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Bank Account Params Object</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/createtokenwithbankaccount.html"
                          >.createTokenWithBankAccount()</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Create Source Object With Params</h3>
                    <ul class="">
                      <li class="navListItem navListItemActive">
                        <a
                          class="navItem"
                          href="/tipsi-stripe/docs/createsourcewithparamsparams.html"
                          >.createSourceWithParams()</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Components</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/paymentcardtextfield.html"
                          >&lt;PaymentCardTextField /&gt;</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Error Codes</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/errorcodes.html">Error Codes</a>
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Tests</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/tests-local-ci.html"
                          >Local CI</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/tests-manual.html">Manual</a>
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Troubleshooting</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/troubleshooting-android.html"
                          >Android</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/troubleshooting-jest.html"
                          >Jest</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/troubleshooting-tests.html"
                          >Tests</a
                        >
                      </li>
                      <li class="navListItem">
                        <a
                          class="navItem"
                          href="/tipsi-stripe/docs/troubleshooting-useframeworks-issue.html"
                          >use_frameworks issue</a
                        >
                      </li>
                    </ul>
                  </div>
                  <div class="navGroup">
                    <h3 class="navGroupCategoryTitle">Deprecated Docs</h3>
                    <ul class="">
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/openapplepaysetup.html"
                          >.openApplePaySetup()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/deviceSupportsApplePay.html"
                          >.deviceSupportsApplePay()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/devicesupportsandroidpay.html"
                          >.deviceSupportsAndroidPay()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/canmakeandroidpaypayments.html"
                          >.canMakeAndroidPayPayments()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a
                          class="navItem"
                          href="/tipsi-stripe/docs/canmakeapplepaypaymentsoptions.html"
                          >.canMakeApplePayPayments()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a
                          class="navItem"
                          href="/tipsi-stripe/docs/paymentrequestwithandroidpay.html"
                          >.paymentRequestWithAndroidPay()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a
                          class="navItem"
                          href="/tipsi-stripe/docs/paymentrequestwithapplepayitemsoptions.html"
                          >.paymentRequestWithApplePay()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/completeapplepayrequest.html"
                          >.completeApplePayRequest()</a
                        >
                      </li>
                      <li class="navListItem">
                        <a class="navItem" href="/tipsi-stripe/docs/cancelapplepayrequest.html"
                          >.cancelApplePayRequest()</a
                        >
                      </li>
                    </ul>
                  </div>
                </div>
              </section>
            </div>
            <script>
              var coll = document.getElementsByClassName('collapsible');
              var checkActiveCategory = true;
              for (var i = 0; i < coll.length; i++) {
                var links = coll[i].nextElementSibling.getElementsByTagName('*');
                if (checkActiveCategory) {
                  for (var j = 0; j < links.length; j++) {
                    if (links[j].classList.contains('navListItemActive')) {
                      coll[i].nextElementSibling.classList.toggle('hide');
                      coll[i].childNodes[1].classList.toggle('rotate');
                      checkActiveCategory = false;
                      break;
                    }
                  }
                }

                coll[i].addEventListener('click', function() {
                  var arrow = this.childNodes[1];
                  arrow.classList.toggle('rotate');
                  var content = this.nextElementSibling;
                  content.classList.toggle('hide');
                });
              }

              document.addEventListener('DOMContentLoaded', function() {
                createToggler('#navToggler', '#docsNav', 'docsSliderActive');
                createToggler('#tocToggler', 'body', 'tocActive');

                var headings = document.querySelector('.toc-headings');
                headings &&
                  headings.addEventListener(
                    'click',
                    function(event) {
                      var el = event.target;
                      while (el !== headings) {
                        if (el.tagName === 'A') {
                          document.body.classList.remove('tocActive');
                          break;
                        } else {
                          el = el.parentNode;
                        }
                      }
                    },
                    false
                  );

                function createToggler(togglerSelector, targetSelector, className) {
                  var toggler = document.querySelector(togglerSelector);
                  var target = document.querySelector(targetSelector);

                  if (!toggler) {
                    return;
                  }

                  toggler.onclick = function(event) {
                    event.preventDefault();

                    target.classList.toggle(className);
                  };
                }
              });
            </script>
          </nav>
        </div>
        <div class="container mainContainer">
          <div class="wrapper">
            <div class="post">
              <header class="postHeader">
                <h1 class="postHeaderTitle">.createSourceWithParams(params) -&gt; Promise</h1>
              </header>
              <article>
                <div>
                  <span
                    ><p>
                      Creates source object based on params. Sources are used to create payments for
                      a variety of <a href="https://stripe.com/docs/sources">payment methods</a>
                    </p>
                    <p>
                      <em>NOTE</em>: For sources that require redirecting your customer to authorize
                      the payment, you need to specify a return URL when you create the source. This
                      allows your customer to be redirected back to your app after they have
                      authorized the payment. For this return URL, you can either use a custom URL
                      scheme or a universal link supported by your app.
                    </p>
                    <h5>
                      <a class="anchor" aria-hidden="true" id="ios"></a
                      ><a href="#ios" aria-hidden="true" class="hash-link"
                        ><svg
                          class="hash-link-icon"
                          aria-hidden="true"
                          height="16"
                          version="1.1"
                          viewBox="0 0 16 16"
                          width="16"
                        >
                          <path
                            fill-rule="evenodd"
                            d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                          ></path></svg></a
                      >iOS
                    </h5>
                    <p>
                      For more information on registering and handling URLs in your app, refer to
                      the Apple documentation:
                    </p>
                    <ul>
                      <li>
                        <a
                          href="https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html#//apple_ref/doc/uid/TP40007072-CH6-SW10"
                          >Implementing Custom URL Schemes</a
                        >
                      </li>
                      <li>
                        <a
                          href="https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html"
                          >Supporting Universal Links</a
                        >
                      </li>
                    </ul>
                    <p>
                      You also need to setup your <code>AppDelegate.m</code> app delegate to forward
                      URLs to the Stripe SDK according to the
                      <a href="https://stripe.com/docs/mobile/ios/sources#redirecting-your-customer"
                        >official iOS implementation</a
                      >.
                    </p>
                    <h5>
                      <a class="anchor" aria-hidden="true" id="android"></a
                      ><a href="#android" aria-hidden="true" class="hash-link"
                        ><svg
                          class="hash-link-icon"
                          aria-hidden="true"
                          height="16"
                          version="1.1"
                          viewBox="0 0 16 16"
                          width="16"
                        >
                          <path
                            fill-rule="evenodd"
                            d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                          ></path></svg></a
                      >Android
                    </h5>
                    <p>
                      You have to declare your return url in application's
                      <code>build.gradle</code> file. In order to do that, add the following code
                      replacing <code>CUSTOM_SCHEME</code> with the your custom scheme inside the
                      <code>android.defaultConfig</code> block.
                    </p>
                    <pre><code class="hljs css language-groovy">android {
    <span class="hljs-comment">// ...</span>
    defaultConfig {
        <span class="hljs-comment">// ...</span>
        manifestPlaceholders = [
<span class="hljs-symbol">            tipsiStripeRedirectScheme:</span> <span class="hljs-string">"CUSTOM_SCHEME"</span>
        ]
    }
    <span class="hljs-comment">// ...</span>
}
</code></pre>
                    <blockquote>
                      <p>
                        Example: if the return URL used is <code>my_custom_scheme://callback</code>,
                        replace <code>CUSTOM_SCHEME</code> with <code>my_custom_scheme</code>.
                      </p>
                    </blockquote>
                    <p>
                      <strong>NOTE</strong>: the redirection will be automatically handled by
                      tipsi-stripe <strong>on its own activity</strong>. If your app makes use of
                      its own custom URL scheme for other purpose than handling stripe payments,
                      make sure that the <code>CUSTOM_SCHEME</code> value is not exactly the same as
                      the one used in the rest of the app.
                    </p>
                    <blockquote>
                      <p>
                        In such a case you might end up using
                        <code>my_custom_scheme_tipsi://callback</code> as return URL and setting
                        <code>CUSTOM_SCHEME</code> equal to <code>my_custom_scheme_tipsi</code>,
                        following the previous example.
                      </p>
                    </blockquote>
                    <p>
                      You also need to add into your application's manifest section with redirect
                      activity:
                    </p>
                    <pre><code class="hljs css language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">activity</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">".RedirectUriReceiver"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">intent-filter</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">action</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.intent.action.VIEW"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">category</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.intent.category.DEFAULT"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">category</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.intent.category.BROWSABLE"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">data</span> <span class="hljs-attr">android:scheme</span>=<span class="hljs-string">"${tipsiStripeRedirectScheme}"</span> <span class="hljs-attr">tools:replace</span>=<span class="hljs-string">"android:scheme"</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">intent-filter</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">activity</span>&gt;</span>
</code></pre>
                    <p>
                      This explicit designation of RedirectUriReceiver needs to override the default
                      <code>example</code> redirect scheme, that has already been defined in the
                      tipsi-stripe library.
                    </p>
                    <p>You also need to add:</p>
                    <pre><code class="hljs"><span class="hljs-symbol">xmlns:</span>tools=<span class="hljs-string">"http://schemas.android.com/tools"</span>
</code></pre>
                    <p>as an attribute into the root node of your manifest.</p>
                    <p>
                      <strong>NOTE</strong>: This is <strong>only</strong> necessary if you are
                      going to use Sources!
                    </p>
                    <p><code>params</code> — An object with the following keys:</p>
                    <p>
                      <strong
                        >Depending on the type you need to provide different params. Check the
                        STPSourceParams docs for reference.</strong
                      >
                    </p>
                    <table>
                      <thead>
                        <tr>
                          <th style="text-align:left">Key</th>
                          <th style="text-align:left">Type</th>
                          <th style="text-align:left">Description</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          <td style="text-align:left">type (Required)</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">
                            The type of the source to create. Can be one of:
                            <strong
                              >bancontact ‖ card ‖ griopay ‖ ideal ‖ sepaDebit ‖ sofort ‖
                              threeDSecure ‖ alipay</strong
                            >
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">amount</td>
                          <td style="text-align:left">Number</td>
                          <td style="text-align:left">
                            A positive number in the smallest currency unit representing the amount
                            to charge the customer (e.g., 1099 for a €10.99 payment)
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">name</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">The full name of the account holder</td>
                        </tr>
                        <tr>
                          <td style="text-align:left">returnURL</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">
                            The URL the customer should be redirected to after they have
                            successfully verified the payment
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">statementDescriptor</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">
                            A custom statement descriptor for the payment
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">currency</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">
                            The currency associated with the source. This is the currency for which
                            the source will be chargeable once ready
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">email</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">The customer’s email address</td>
                        </tr>
                        <tr>
                          <td style="text-align:left">bank</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">The customer’s bank</td>
                        </tr>
                        <tr>
                          <td style="text-align:left">iban</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">
                            The IBAN number for the bank account you wish to debit
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">addressLine1</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">
                            The bank account holder’s first address line (optional)
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">city</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">The bank account holder’s city</td>
                        </tr>
                        <tr>
                          <td style="text-align:left">postalCode</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">The bank account holder’s postal code</td>
                        </tr>
                        <tr>
                          <td style="text-align:left">country</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">
                            The bank account holder’s two-letter country code (sepaDebit) or the
                            country code of the customer’s bank (sofort)
                          </td>
                        </tr>
                        <tr>
                          <td style="text-align:left">card</td>
                          <td style="text-align:left">String</td>
                          <td style="text-align:left">The ID of the card source</td>
                        </tr>
                      </tbody>
                    </table>
                    <h3>
                      <a class="anchor" aria-hidden="true" id="example"></a
                      ><a href="#example" aria-hidden="true" class="hash-link"
                        ><svg
                          class="hash-link-icon"
                          aria-hidden="true"
                          height="16"
                          version="1.1"
                          viewBox="0 0 16 16"
                          width="16"
                        >
                          <path
                            fill-rule="evenodd"
                            d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                          ></path></svg></a
                      >Example
                    </h3>
                    <pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> params = {
  <span class="hljs-attr">type</span>: <span class="hljs-string">'alipay'</span>,
  <span class="hljs-attr">amount</span>: <span class="hljs-number">5</span>,
  <span class="hljs-attr">currency</span>: <span class="hljs-string">'EUR'</span>,
  <span class="hljs-attr">returnURL</span>: <span class="hljs-string">'example://stripe-redirect'</span>,
}

<span class="hljs-keyword">const</span> source = <span class="hljs-keyword">await</span> stripe.createSourceWithParams(params)

<span class="hljs-comment">// Client specific code</span>
<span class="hljs-comment">// api.sendSourceToBackend(source)</span>
</code></pre>
                    <p>
                      <img
                        src="https://user-images.githubusercontent.com/5305150/30137085-019fa90e-9362-11e7-9e6b-b934d6e68b60.gif"
                        alt=""
                      />
                    </p>
                  </span>
                </div>
              </article>
            </div>
            <div class="docs-prevnext">
              <a class="docs-prev button" href="/tipsi-stripe/docs/createtokenwithbankaccount.html"
                ><span class="arrow-prev">← </span
                ><span class="function-name-prevnext">.createTokenWithBankAccount()</span></a
              ><a class="docs-next button" href="/tipsi-stripe/docs/paymentcardtextfield.html"
                ><span class="function-name-prevnext">&lt;PaymentCardTextField /&gt;</span
                ><span class="arrow-next"> →</span></a
              >
            </div>
          </div>
        </div>
      </div>
      <footer class="nav-footer" id="footer">
        <section class="sitemap">
          <a href="/tipsi-stripe/" class="nav-home"></a>
          <div>
            <h5>Docs</h5>
            <a href="/tipsi-stripe/docs/en/index.html">Getting Started</a
            ><a href="/tipsi-stripe/docs/en/running-apple-pay-on-a-real-device.html"
              >Running on Device</a
            ><a href="/tipsi-stripe/docs/en/index.html">API Reference</a>
          </div>
          <div>
            <h5>More</h5>
            <a href="/tipsi-stripe/blog">Blog</a><a href="https://github.com/">GitHub</a
            ><a
              data-show-count="true"
              class="github-button"
              href="https://github.com/tipsi/tipsi-stripe"
              data-icon="octicon-star"
              data-count-href="/tipsi/tipsi-stripe/stargazers"
              data-count-aria-label="# stargazers on GitHub"
              aria-label="Star this project on GitHub"
              >Star</a
            >
          </div>
        </section>
        <section class="copyright">Copyright © 2019 Tipsi.</section>
      </footer>
    </div>
  </body>
</html>
